home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / cli / mkms_1_35.lha / mkms / readme < prev    next >
Text File  |  1994-10-21  |  7KB  |  168 lines

  1.  
  2. This is a simple program I wrote just to reduce my long distance costs.
  3. With very little effort (and an ANSI compiler) this will compile and 
  4. run on just about any machine with any architecture.  You might need 
  5. to exert a little thought to decide where to put the "config" file but,
  6. the rest should be straight forward enough.
  7.  
  8. All this program does is take an input file (or you may type in the 
  9. relevant information from the keyboard directly into mkms should
  10. you indicate that option on the command line) and create a simple
  11. *IX bourne-shell script that mails out all the messages to the various
  12. addresses at once.  You do this on your personal machine and archive 
  13. the files and the script together (or not) and upload the archive
  14. (or all the files and script) to your mailing account and then extract
  15. the files from the archive (or not if you uploaded individual files)
  16. and lastly execute the script (for a script named "mail.sh" you would 
  17. do something like ". ./mail.sh" after doing a "chmod 700 mail.sh")
  18. It seems complex at first but really it is simple once you have tried
  19. it.  A simple step-by-step list of what you need to do:
  20.  
  21. 1) write files to mail out
  22. 2) create input file
  23. 3) run mkms on input file ("mkms -i<input> -o<output>")
  24. 4) (optional) archive all the files and script
  25. 5) upload archive (or individul files and script) to mailing address.
  26. 6) (optional dependant on #4) extract files from archive
  27. 7) execute script
  28.  
  29. That's all there is to it.... 
  30.  
  31. There are three example files included in the archive - res.test, 
  32. ftp.test and .mkmsrc.  The res.test is a sample mail input file, ftp.test
  33. is a sample ftp index file and .mkmsrc is just an example of the "config" 
  34. file.  This "config" file is where the user places his/her "aliases".  
  35.  
  36. Add lines to the config file in the manner:
  37.  
  38. alias real_address
  39.  
  40. (the alias must be a single string with no embedded spaces as must 
  41. be the real_address.  Both must be separated by a single space ONLY)
  42. So that if you want to use "airk" in the input instead of having to
  43. type out "uairk@mcl.mcl.ucsb.edu" each time you use that address to
  44. mail to your entry in your config file (.mkmsrc) would be:
  45.  
  46. airk uairk@mcl.mcl.ucsb.edu
  47.  
  48. The config file should be in the upmost level of your home directory
  49. since mkms looks at "$HOME/.mkmsrc" to find it.  Of course
  50. you can compile it differently.  
  51.  
  52. The input looks like:
  53.  
  54. address file subject
  55.  
  56. Where "address" is the real address or alias (from the config file)
  57. of the receiving address.  "file" is the file you are sending to
  58. "address" and "subject" is the subject header you want to appear
  59. with that file when the user at "address" opens his/her electronic
  60. mail box.  An example might be:
  61.  
  62. airk a_message_to.airk What's new with you?
  63.  
  64. So here airk (an alias for uairk@mcl.mcl.ucsb.edu) is a receiving 
  65. address.  To that address the file "a_message_to.airk" is sent
  66. with the subject header "What's new with you".
  67.  
  68. It could also be done as:
  69.  
  70. uairk@mcl.mcl.ucsb.edu a_message_to.airk What's new with you?
  71.  
  72. Where the alias was not used.
  73.  
  74. A note on ftp sites and usage for ncftp:
  75.  
  76. If I were to go to ftp.cdrom.com to retrieve the file 
  77.  
  78. /pub/aminet/util/misc/mkms.tar.gz
  79.  
  80. I could do this:
  81.  
  82. ncftp ftp.cdrom.com:/pub/aminet/util/misc/mkms.tar.gz
  83.  
  84. and ncftp would facilitate the retrieval for me.  The way mkms works
  85. with this is by letting you create an index file like the sample 
  86. included with this distribution.  The command line then would be:
  87.  
  88. mkms -F -i ftp.test -S ftp.cdrom.com:/pub/aminet -o ftp.sh
  89.  
  90. (note that since mkms uses getopt() you need to indicate the input
  91.  and output files as well as the ftp site name following their
  92.  respective command line flags)
  93.  
  94. which would have mkms read in the ftp index file and create a script
  95. to retrieve each of the files in the index using the path
  96.  
  97. ftp.cdrom.com:/pub/aminet
  98.  
  99. If you look at the example index you should see how this works. It
  100. is probably wise to create entries in your .mkmsrc file for ftp sites
  101. you visit often.  See the example .mkmsrc file.  
  102.  
  103. An yet another side note:
  104.  
  105. The .mkmsrc file also takes comments.  Comments have a '#' in the first
  106. column.  Those lines beginning with a '#', space, or tab will be ignored.
  107. Not that comments should be necessary but, someone might find use for 
  108. them.
  109.  
  110. You should see the manpage (mkms.1) for details on the other
  111. various options and the bug... 
  112.  
  113. One other thing:
  114.  
  115. I make extensive use of the clib function "strsep".  It is therefore
  116. impossible to compile mkms without the ability to use strsep.  If
  117. your compiler's C function library does not contain strsep() just
  118. comment out the line in the Makefile that defines SRCS and uncomment
  119. the one that includes strsep.c (ie - remove the '#' from the one
  120. with strsep.c and put a '#' in front of the line for SRCS that does
  121. not have strsep.c)  If your compiler's clib DOES have strsep() then
  122. make sure that the line that includes strsep.c is commented out and
  123. the line that does not include strsep.c is uncommented.  To find out
  124. if you have strsep() compiler's clib - just do:
  125.  
  126. grep -i strsep /usr/include/string.h
  127.  
  128. (that's where strsep() should be if it exists)  If you get no response
  129. on that inquiry it's likely you do not have it.  
  130.  
  131.  
  132. Again, strsep.c is property of BSD and I am including it here under
  133. the copyright license that is a part of the file strsep.c.
  134.  
  135. I should probably rewrite mkms to look for the config file someplace
  136. else besides '$HOME' since some people like to change that variable
  137. (I have no idea why) but, I wrote it for myself mostly since my Long
  138. Distance costs were getting outta hand (there's no local access to the
  139. internet here) and I needed a quick and cheap solution to the problem.
  140. I can be contacted at:
  141.  
  142. gort@shell.portal.com
  143.  
  144. if there are serious problems with mkms.
  145.  
  146.  
  147. disclaimer:
  148.  
  149. This is freeware - therefore you may do with it what you wish since I
  150. am tossing it into the public domain.  If you do make changes to the
  151. sources, mark them as changes so that others know the original author
  152. did not create those changes.  MKMS however is intended to be FREEware
  153. and hence it should stay that way.  It may not be sold for any price.
  154.  
  155. Being as mkms is free software and in the public domain I make no
  156. claims as to what it will or will not do nor do I, the author, accept any
  157. responsibility for any damages to man, machine, data, or animal due to
  158. the use or misuse of this software.
  159.  
  160. This software and all documents from the original must be included in
  161. any further distribution of this package.
  162.  
  163. This software (mkms.c, Makefile, mkms.1 ftp.test, mail.test, .mkmsrc)
  164. is Copyright (c)1994 by Eric R. Augustine.
  165.  
  166.  
  167.  
  168.